Fix what bolt2_open_channel_sending_node_checks_part1
tests
#1317
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is split out from #1311.
There are currently two issues with
bolt2_open_channel_sending_node_checks_part1
which counteracteach other and hide that the test isn't testing what it should be.
First of all, the final
create_channel
call actually failsbecause we try to open a channel with ourselves, instead of
panicing as the test is supposed to check for.
However, when we fix the create_channel call to panic, when we
drop
nodes[1]
aftercreate_channel
panics, we fail theno-pending-messages test as it as an expeted
accept_channel
inits outbound buffer. This causes a double-panic.
Previously, these two offset each other - instead of panicing in
create_channel
we'd panic in the Node drop checks.This fixes both by fetching the
accept_channel
before we go intothe panic'ing
create_channel
call (who's arguments werecorrected).